<script type="text/javascript" src="../media/system/js/jquery-1.9.1.js"></script>
<script type="text/javascript" src="../media/system/js/jQuery.vietvang.validate.js"></script>
	<script type="text/javascript">
		$(document).ready(function(){
			$('#adminForm').validate({
			});
		});
</script>
<div id="jm-left" class="" >
    <div class="jm-module " id="">
       <div class="jm-module-content">
          <h3 class="jm-title">活動情報</h3>
          <div class="content-message">
            <table width="220" border="0" cellspacing="0" cellpadding="0">
                <tbody>
                    <tr>
                        <td width="30" height="24" align="right" nowrap="">■&nbsp;</td>
                        <td width="170">都道府県を選択</td>
                    </tr>
                    <tr>
                        <td></td>
                        <td>
                            <select name="jform[PREF]" style="width: 140px;" id="jformPREF">
                                <option value="0" selected="selected">指定しない</option>
                                  <?php
                                    foreach($this->pref as $value){
                                  ?>
                                  <option value="<?php echo $value->PREF_CODE; ?>"<?php if ($this->list['PREF'] == $value->PREF_CODE) { echo ' selected="selected"';} ?>>
                                  <?php echo $value->PREF_NAME; ?></option>
                                  <?php
                                    }
                                  ?>                    
                            </select>
                        </td>
                    </tr>
                    <tr>
                        <td height="15" colspan="2"></td>
                    </tr>
                    <tr>
                        <td height="24" align="right" nowrap="">■&nbsp;</td>
                        <td>オススメ度</td>
                    </tr>
                    <tr>
                        <td></td>
                        <td>
                            <select class="tx-small" style="width: 140px;" name="jform[PEDE]" id="jformPEDE">
                                <option value="0">指定しない</option>
                                 <?php 
                                    foreach(bgData::getRecommended() as $key=>$item){
                                        ?>
                                        <option value="<?php echo $key; ?>"<?php if ($this->list['PEDE'] == $key) { echo ' selected="selected"';} ?>>
                                        <?php echo $item; ?></option>
                                        
                                        <?php 
                                    }
                                 ?>
                                
                            </select>
                        </td>
                    </tr>
                    <tr>
                        <td height="15" colspan="2"></td>
                    </tr>
                    <tr>
                        <td height="24" align="right" nowrap="">■&nbsp;</td>
                        <td>事業名を入力</td>
                    </tr>
                    <tr>
                        <td></td>
                        <td><input name="jform[ACTT_NAME]" id="jformACTT_NAME" type="text" size="16" value="<?php echo $this->list['ACTT_NAME']; ?>"/></td>
                    </tr>
                    <tr>
                        <td height="15" colspan="2"></td>
                    </tr>
                    
                    <tr>
                        <td height="24" align="right" nowrap="">■&nbsp;</td>
                        <td>人数</td>
                    </tr>
                    <tr>
                        <td></td>
                        <td>
                            <input name="jform[ACTT_FNUM]" id="jformACTT_FNUM" type="text" vvName="number"  size="16" value="<?php echo $this->list['ACTT_FNUM'] ?>"/><br />～<span style="color: red;" name="msg_error"></span>
                        </td>
                        <tr>
                            <td></td>
                            <td>
                                <input name="jform[ACTT_TNUM]" id="jformACTT_TNUM" vvName="number"  type="text" size="16" value="<?php echo $this->list['ACTT_TNUM'] ?>"/>人<span style="color: red;" name="msg_error"></span>
                            </td> 
                        </tr>
                    </tr>
                    
                     <tr>
                        <td height="24" align="right" nowrap="">■&nbsp;</td>
                        <td>期間</td>
                    </tr>
                    <tr>
                        <td></td>
                        
                        <td>
                            <?php if($this->list['FROMDATE_SEARCH'] != 0){ $dt = date('Y-m-d',strtotime($this->list['FROMDATE_SEARCH']));}else{ $dt=null;} echo JHtml::calendar($dt, 'jform[FROMDATE_SEARCH]', 'jformFROMDATE');?>
                            <span name="msg_error">
                        <br />～</td>
                    </tr>
                    <tr>
                        <td></td>                        
                        <td>
                        <?php if($this->list['TODATE_SEARCH'] != 0){ $dt = date('Y-m-d',strtotime($this->list['TODATE_SEARCH']));}else{ $dt=null;} echo JHtml::calendar($dt, 'jform[TODATE_SEARCH]', 'jformTODATE');?>
                            <span name="msg_error"></span>
                    </td>
                    </tr>
                    <tr>
                        <td height="24" align="right" nowrap="">■&nbsp;</td>
                        <td>施設</td>
                    </tr>
                    <tr>
                        <td></td>
                        <td>
                            <table border="0" width="100%">
                                <?php foreach ($this->mfac as $key=>$mfac) {
                                ?>
                                    <tr>
                                        <td style="width: 1%;"><input style="float: left" type="checkbox" name="jform[MFACC<?php echo $mfac->MFAC_CODE; ?>]" id="MFACC<?php echo $mfac->MFAC_CODE; ?>" value="<?php echo $mfac->MFAC_CODE; ?>"  <?php if(isset($this->list['MFACC'.$mfac->MFAC_CODE])) { echo 'checked="checked"'; }  ?> /></td>
                                        <td><label for="MFACC<?php echo $mfac->MFAC_CODE; ?>"><?php echo $mfac->MFAC_NAME; ?></label></td>
                                    </tr>
                                <?php
                                } ?>
                            </table>
                        </td>
                    </tr>
                    <tr>
                        <td height="24" align="right" nowrap="">■&nbsp;</td>
                        <td>対象</td>
                    </tr>
                    <tr>
                        <td></td>
                        <td>
                            <table border="0" width="100%">
                                <?php foreach ($this->mobj as $key=>$mobj) {
                                ?>
                                    <tr>
                                        <td style="width: 1%;"><input style="float: left" type="checkbox" name="jform[MOBJJ<?php echo $mobj->MOBJ_CODE; ?>]" id="MOBJJ<?php echo $mobj->MOBJ_CODE; ?>" value="<?php echo $mobj->MOBJ_CODE; ?>"  <?php if(isset($this->list['MOBJJ'.$mobj->MOBJ_CODE])) { echo 'checked="checked"'; }  ?> /></td>
                                        <td><label for="MOBJJ<?php echo $mobj->MOBJ_CODE; ?>"><?php echo $mobj->MOBJ_NAME; ?></label></td>
                                    </tr>
                                <?php
                                } ?>
                            </table>
                        </td>
                    </tr>
                    <tr>
                        <td height="24" align="right" nowrap="">■&nbsp;</td>
                        <td>内容</td>
                    </tr>
                    <tr>
                        <td></td>
                        <td>
                            <table border="0" width="100%">
                                <?php foreach ($this->mcon as $key=>$mcon) {
                                ?>
                                    <tr>
                                        <td style="width: 1%;"><input style="float: left" type="checkbox" name="jform[MCONN<?php echo $mcon->MCON_CODE; ?>]" id="MCONN<?php echo $mcon->MCON_CODE; ?>" value="<?php echo $mcon->MCON_CODE; ?>"  <?php if(isset($this->list['MCONN'.$mcon->MCON_CODE])) { echo 'checked="checked"'; }  ?> /></td>
                                        <td><label for="MCONN<?php echo $mcon->MCON_CODE; ?>" ><?php echo $mcon->MCON_NAME; ?></label></td>
                                    </tr>
                                <?php
                                } ?>
                            </table>
                        </td>
                    </tr>
                    <tr>
                        <td height="15" colspan="2"></td>
                    </tr>
                    
                    <tr>
                    
                    <td class="center" colspan="2">
                        <!--<input type="submit" name="Search" value="検索" id="submit"/>-->
                        <button id="search" type="button" onclick="Joomla.submitbutton('search')">検索</button>

                    
                    </td>
                    </tr>
                </tbody>
                </table>
          </div>
            <!-- <input type="hidden" name="task" value="search"/> -->
            <input type="hidden" name="check" value="1"/>
          <div class="clearfix"></div>
       </div>
    </div>
    
 </div>
 <script>
    window.addEvent('domready', function() {Calendar.setup({
                	// Id of the input field
                	inputField: "jformFROMDATE",
                	// Format of the input field
                	ifFormat: "%Y-%m-%d",
                	// Trigger for the calendar (button ID)
                	button: "jformDATE",
                	// Alignment (defaults to "Bl")
                	align: "Bl",
                	singleClick: true,
                	firstDay: 0
            	});
            });
      window.addEvent('domready', function() {Calendar.setup({
            	// Id of the input field
            	inputField: "jformTODATE",
            	// Format of the input field
            	ifFormat: "%Y-%m-%d",
            	// Trigger for the calendar (button ID)
            	button: "jformDATE",
            	// Alignment (defaults to "Bl")
            	align: "Bl",
            	singleClick: true,
            	firstDay: 0
        	});
        });

    jq('#jformFROMDATE').css("height","12px");
    jq('#jformTODATE').css("height","12px");
 </script>